package gameObject.effect;

import main.Res;
import base.RotatableSprite;
import base.SpriteContainer;

public class SwordEffect extends BulletEffect{
	public SwordEffect(int id,
			int x,int y,int targetX,int targetY,
			int dam,int speed,int lifeTime) {
		super(new RotatableSprite(Res.IMG_EFFECTS[id], 60, 55, 3),
				x,y,targetX,targetY,30,25,
				dam,speed,lifeTime);
		sprite.setFrameSequence(new int[]{0,1,2});
	}
	public int hit(SpriteContainer obj){
		if(this.sprite.collidesWith(obj.getSprite(),true))
		{
			return damage/3;
		}
		return 0;
	}
}
